<?php echo $this->doctype() ?>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
	<?php echo $this->headMeta() ?>

	<?php echo $this->headTitle() ?>

	<?php echo $this->jQuery()->setLocalPath('/js/jquery/jquery.js')->enable()->setUiLocalPath('/js/jquery/ui/ui.core.packed.js') ?>

	<?php echo $this->headScript() ?>

	<?php echo $this->headStyle() ?>

<?php
	$this->headLink()->appendStylesheet('/css/sheet.css', 'screen');
	//$this->headLink()->appendStylesheet('/css/ie6.css', 'screen', 'lte IE 6');
?>
	<?php echo $this->headLink() ?>

</head>
	<body>
		<h1><a href="<?php echo $this->url(array(), 'default', true) ?>">Example.com</a></h1>

<?php if ($this->auth()->hasIdentity()) { ?>
		<p>Witaj <?php echo $this->auth()->getIdentity()->name ?>. <a href="<?php echo $this->url(array('controller' => 'user', 'action' => 'logout'), 'default', true) ?>">Wyloguj</a>.</p>
<?php } else { ?>
		<p>
			<a href="<?php echo $this->url(array('controller' => 'user', 'action' => 'register'), 'default', true) ?>" class="register">Rejestracja</a>
			<a href="<?php echo $this->url(array('controller' => 'user', 'action' => 'login'), 'default', true) ?>" class="login">Logowanie</a>
		</p>
<?php } ?>

<?php
if($this->flashMessenger()->hasCurrentMessages()) {
	echo $this->htmlList($this->flashMessenger()->getCurrentMessages(), false, array('id' => 'errors'));
	$this->flashMessenger()->clearCurrentMessages();
} else if ($this->flashMessenger()->hasMessages()) {
	echo $this->htmlList($this->flashMessenger()->getMessages(), false, array('id' => 'errors'));
}
?>

<?php echo $this->layout()->content ?>

	</body>
</html>